Conversation
### What Note: this code was generated using AI but I confirmed it works by running a few missions. This PR will new "mission" label to all pods. ### Why The label should help us filter logs or metrics for pods which should be useful for troubleshooting failures.
There was a problem hiding this comment.
Pull request overview
This PR adds a "mission" label to all Kubernetes pods created by the Stellar Supercluster tool to improve observability and troubleshooting capabilities. The label allows filtering logs and metrics by mission type.
Changes:
- Added
missionNamefield toMissionContexttype - Created
PodLabels()helper method that combines existing labels with mission label - Updated all pod template specifications to use the new mission-aware labels
- Initialized mission names in all
MissionContextinstantiations ("Tests", "Clean", and actual mission names)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/FSLibrary/StellarMissionContext.fs | Adds missionName field to MissionContext type definition |
| src/FSLibrary/StellarKubeSpecs.fs | Implements PodLabels() method and updates pod metadata to include mission label |
| src/FSLibrary.Tests/Tests.fs | Initializes test context with missionName "Tests" |
| src/App/Program.fs | Sets missionName for Clean operation and runtime missions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/FSLibrary/StellarKubeSpecs.fs
Outdated
| member self.PodLabels() : Map<string, string> = | ||
| Map.add "mission" self.missionContext.missionName CfgVal.labels |
There was a problem hiding this comment.
The mission name is used directly as a Kubernetes label value without validation. Kubernetes label values must be 63 characters or less and can only contain alphanumeric characters, dashes, underscores, or dots, and must begin and end with an alphanumeric character. While the current mission names in the codebase appear to comply with these restrictions, consider adding validation to prevent runtime errors if invalid mission names are provided in the future.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
What
Note: this code was generated using AI but I confirmed it works by running a few missions.
This PR will new "mission" label to all pods.
Why
The label should help us filter logs or metrics for pods which should be useful for troubleshooting failures.